#pragma once

typedef unsigned char	uchar;
typedef unsigned short	ushort;
typedef unsigned int	uint;
typedef unsigned long	ulong;

#define IsOn(a, b)		(a & b)
#define SetOn(a, b)		(a |= b)
#define SetOff(a, b)	(a &= ~b);

uint StrToEnum(const std::string& c);

std::string GetFileName(const std::string& path);
std::string GetFileExt(const std::string& path);
std::string GetFileFullname(const std::string& path);
std::string GetFilePath(const std::string& path);

float RandFloat(float min, float max);
int RandInt(int min, int max);

template<typename T>
std::string ToStr(T t)
{
	std::stringstream ss;
	ss << t;
	return ss.str();
}